<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Redirect;

class HomeController extends Controller
{
    //
    public function index()
    {
		$user = \Auth::user();
        if ($user->role == 1) {
            return Redirect::to('student');
        } else if ($user->role == 2) {
            return Redirect::to('supervisor');
        } else if ($user->role == 3) {
            return Redirect::to('admin');
        }
    }

}
